package com.youdianstar.app.common.network


/**
 * File: AppException
 * Author: 82149 Create: 2021/9/18 12:24
 * Changes (from 2021/9/18)
 * --------------------------------------------------
 * description:
 * ---------------------------------------------------
 *
 */
class AppException :Exception {

    var errorMsg: String //错误消息
    var errCode: Int = 0 //错误码
    var errorLog: String? //错误日志
    var throwable: Throwable? = null

    constructor(errCode: Int, error: String?, errorLog: String? = "", throwable: Throwable? = null) : super(error) {
        this.errorMsg = error ?: "Request failed!"
        this.errCode = errCode
        this.errorLog = errorLog ?: this.errorMsg
        this.throwable = throwable
    }
}